<extend name="Public/base" />

<block name="body">
	<div class="main-title cf">
		<h2>新增职位</h2>
	</div>

	<!-- 标签页导航 -->
	<div class="tab-wrap">
		<div class="tab-content">
			<!-- 表单 -->
			<form id="form" action="__SELF__" method="post" class="form-horizontal doc-modal-form">
				<!-- 基础 -->
				<div id="tab1" class="tab-pane in tab1">
					<present name="info">
						<input type="hidden" value="{$info.id}" name="id"/>
					</present>
					<div class="form-item cf">
						<label class="item-label">部门名称<span class="check-tips">（请输入部门名称）</span></label>
						<div class="controls">
							<input type="text" class="text " name="name" value="{$info.name}">
						</div>
					</div>
					<div class="form-item cf">
						<label class="item-label">部门简称<span class="check-tips">（请输入部门简称）</span></label>
						<div class="controls">
							<input type="text" class="text " name="short" value="{$info.short}">
						</div>
					</div>
					<div class="form-item cf">
					    <label class="item-label">选择上级部门</label>
					    <div class="controls">
				            <select class="input-xlarge" name="pid">
				            	<option value="0">企业</option>
						      <notempty name="_list">
						      	<foreach name="_list" item="vo">
						      		<option value="{$vo.id}" 
						      			<present name="info">
							      				<eq name="_list['id']" value="$info['pid']">
							      					selected="selected"
							      				</eq>
							      		</present>
						      		>{$vo._html}{$vo.name}</option>
						      	</foreach>						      	
						      </notempty>
				            </select>
				        </div>
					</div>
					<div class="form-item cf">
					    <label class="item-label">选择部门级别</label>
					    <div class="controls">
				            <select class="input-xlarge" name="dept_grand">
						      <notempty name="dept_grands">
						      	<foreach name="dept_grands" item="vo">				      		
						      		<option value="{$key}"
						      			<present name="info">
							      				<eq name="info['dept_grands']" value="$key">
							      					selected="selected"
							      				</eq>
							      				<else/>
							      				<eq name="key" value="1">
							      					selected="selected"
							      				</eq>
							      		</present>
						      		>{$vo}</option>
						      	</foreach>
						      </notempty>
				            </select>
				        </div>
					</div>
					<div class="form-item cf">
						<label class="item-label">排序</span></label>
						<div class="controls">
							<input type="text" class="text " name="sort" value="{$info.sort}">
						</div>
					</div>
					<div class="form-item cf">
						<label class="item-label">状态</label>
						<div class="controls">
							<select name="status">
								<notempty name="status">
							      	<foreach name="status" item="vo">				      		
							      		<option value="{$key}"
							      			<present name="info">
							      				<eq name="info['status']" value="$key">
							      					selected="selected"
							      				</eq>
							      				<else/>
							      				<eq name="key" value="1">
							      					selected="selected"
							      				</eq>
							      			</present>
							      			>{$vo}</option>
							      	</foreach>
						      	</notempty>
								
								<!--<option value="-1" >已删除</option>
								<option value="0" >禁用</option>
								<option value="1" 
									<eq name="info['status']"
									selected="selected">正常</option>
								<option value="2">待审核</option>-->
							</select>
						</div>
					</div>
					<div class="form-item cf">
						<label class="item-label">备注</span></label>
						<div class="controls">
							<textarea name="remark" rows="3" cols="30">{$info.remark}</textarea>
						</div>
					</div>
				</div>

				<!-- 按钮 -->
				<div class="form-item cf">
					<label class="item-label"></label>
					<div class="controls edit_sort_btn">
						<button class="btn submit-btn ajax-post no-refresh" type="submit" target-form="form-horizontal">确 定</button>
						<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/jquery.dragsort-0.5.1.min.js"></script>
<script type="text/javascript" charset="utf-8">
    //导航高亮
    highlight_subnav('{:U('Dept/index')}');

    $(function(){
    	showTab();
    })
</script>
</block>

